<template>
  <div>
    <navTop></navTop>
    <div>
      <van-tabs v-model="isName">
        <van-col span="12" v-for="(item,index) in active" :key="index">
          <van-tab :title="item.title" :to="item.to" :name="item.name"></van-tab>
        </van-col>
        <router-view></router-view>
      </van-tabs>
    </div>
  </div>
</template>

<script>
import navTop from '@/components/common/navTop';
export default {
  data() {
    return {
      isName:this.$route.name,
      active :[
        {title:"登录",name:"login",to:"/my/MyTab/login"},
        {title:"注册",name:"register",to:"/my/MyTab/register"}
      ]
    };
  },
  components: {
    navTop
  },

  methods: {}
};
</script>

<style scoped>
</style>